# -*- coding: utf-8 -*-
"""
author:码同学 极光
date:2023-01-04
desc: 
sample: 
"""

str="111"

age=20

len(str)

# data = " 中国移动"
# print(len(data))
# result = data.strip()
# print(len(data))
# print(len(result))

# line = "username,age,sex"
# for l in line:
#     print(l)
# print("-----------------")
# lines = line.split(",")
# print(type(lines))
# for line in lines:
#     print(line)



# data_list = ['199999999', '12312', 'mtx']
#
# reuslt2 =";".join(data_list)
#
# print(reuslt2, type(reuslt2))



#data = [1, 2, 3, "root","北京",True]
# data.insert(1,"上海")
# # data.append("上海test")
# print(type(data.reverse()))
# # newData = data.reverse()
# print(data)

# print(data[1:3])



# data_list = ['极光', 'zhangsan', '李四', 'mtx', '王五']
# data_list.reverse()
# print(data_list)

#左开右闭
name = "testfan"
# print(name[2:5])

# print(name[-5:-1])
#
# print(name[-1:-5:-1])
#第三位步长  反向  从右开左闭
# print(name[5:2:-1])
# print(name[2:5:-1])
# print(name[-1:-5:-1])
# print(name[2:5])
# print(name[-5:-2])
# print(name[:5])
print(name[-2:0])
print(name[5::1])
#
# print(name[-1])
#
# print(name[::-1])
#
# print(name[:-1]) #testfa
#
# #
# # for i in range(10):
# #     print(i)
#
# for i in range(10, 0,-2):
#     print(i)

#
# info = {
#     "age":18,
#     "status":True,
#     "name":"极光"
# }
#
# print(info.get("age1",100))
# # print(info["age1"])
#
# print(info.items())

# for k,v in info.items():
#     print(k,v)
#
# for item in info.items():
#     print(item)
#     print(item[0],item[1])



#面试
# data_list2 = ('极光', 'zhangsan', '李四', 'mtx', '王五','王五')
# print(data_list2)
#
# data_list3 =list(data_list2)
# print(type(data_list3))
#
# data_list2 = tuple(data_list3)

#print(data_list2[0])

#data_list2.sort()

print(list("test"))

def do_something4(*args,**kwargs):
    print(f"args {type(args)}, kwargs {type(kwargs)} args={args}, kwargs={kwargs}")

# do_something4()
# do_something4(11,22)
# do_something4(k1=11,k2=22)
# do_something4(11,22,k1=11)
# do_something4((11,22),k1=11,k2=22)
# do_something4((11,22),[1,2],k1=11,k2=22)


def do_something3(a1, **kwargs):
    print(f"type_a {type(a1)}, kwargs {type(kwargs)} a1={a1}, kwargs={kwargs}")

info = {
    "age":18,
    "status":True,
    "name":"极光"
}

do_something3('test',**info)
do_something3(2,a2=3,x=2)
do_something3(1,["abc","abc"])
